<div style="padding:30px;">
  <?php if(!empty($id)) { ?>
 <form action="<?= $admin_base_url; ?>staff/edit/<?=$id;?>/<?php echo $cur_page;?>" method="post" id="staff_form">
 <?php } else { ?>
 <form action="<?= $admin_base_url; ?>staff/add/<?= $cur_page;?>" method="post" id="staff_form">
 <?php } ?>
 

    
		<label><?php echo getLangText('staff_first_name',$this); ?>*</label>
		<input class="txt1" type="text" name="first_name" value="<?php echo $staff['first_name'];?>" /></br>
    
		<label><?php echo getLangText('staff_last_name',$this); ?> </label>
		<input class="txt1" type="text" name="last_name" value="<?php echo $staff['last_name'];?>"/><br/>

    
		 <label><?php echo getLangText('staff_gender',$this); ?></label>
		
			Male<input type="radio"  name="gender" value="male" <?php if($staff['gender']=='male') echo 'checked'; ?>/> 
			 Female<input type="radio" name="gender"  value="female" <?php if($staff['gender']=='female') echo 'checked'; ?>/><br/><br/>
	
         <label><?php echo getLangText('staff_staff_code',$this); ?>* </label>
		 <input class="txt1" type="text" name="staff_code" value="<?php echo $staff['staff_code'];?>"/><br/>
	
      
		<label><?php echo getLangText('staff_designation_type',$this); ?></label>
		Teacher<input  type="radio" value="teacher" name="teaching" <?php if($staff['teaching']=='teacher') echo 'checked'; ?>/>    
                                     Other<input type="radio" value="other" name="teaching" <?php if($staff['teaching']=='other') echo 'checked'; ?>/><br/><br/>
	
       
		<label> <?php echo getLangText('staff_designation',$this); ?></label>
		 <input class="txt1" type="text" name="designation" value="<?php echo $staff['designation'];?>"/><br/>
	
    
		<label> <?php echo getLangText('staff_doj',$this); ?>*</label>
		<input id="f_dob" class="txt1" type="text" name="doj" value="<?php echo $staff['doj'];?>"/><button id="f_dob_button" class="calendar">...</button>
	<br/>
		<label> <?php echo getLangText('staff_blood_group',$this); ?></label>
		<select class="txt1" name="blood_group">
                                                   <?php foreach($blood_groups as $val)
												   {
										           	   	echo "<option";
												   		if($staff['blood_group']==$val)
												   		echo " selected='selected'";
												   		echo " > $val </option>";
									               }
									                ?> 
         </select>
         <br/>
	
    
		<label><?php echo getLangText('staff_land_line',$this); ?></label>
		<input class="txt1" type="text" name="land_line" value="<?php echo $staff['land_line'];?>"/> <br/>
	
		<label><?php echo getLangText('staff_mobile',$this); ?></label>
		<input class="txt1" type="text" name="mobile_no" value="<?php echo $staff['mobile_no'];?>"/>
	<br/>
    
		<label><?php echo getLangText('staff_address',$this); ?> </label>
		   <textarea class="txt1" name="address" cols="15" rows="2"><?php echo $staff['address'];?></textarea>
	<br/>
    
		<label><?php echo getLangText('staff_remarks',$this); ?> </label>
	  <textarea class="txt1" name="remarks" cols="15" rows="2"><?php echo $staff['remarks'];?></textarea><br/>
	
		<label>&nbsp;</label>
		   
			<div class="buttons">
			    <button type="submit" name="save" class="positive" value="save" >
			        <img src="<?php echo $admin_image_path?>icons/apply.png" alt=""/>
			          <?php if(!empty($id)) { 
 						echo getLangText('staff_update_button',$this); 
						?>
 							<input type="hidden" name="id" value="<?php echo $id;?>" />
                       
 							<input  type="hidden" name="rurl" value="<?php echo $rurl;?>" />
 					  <?php } else { 
 					  	 echo getLangText('staff_add_button',$this); 
 					  	 } ?>

 			    </button>
			   <a href="<?= $admin_base_url; ?>staff/cancel?rurl=<?php echo $rurl;?>" class="negative">
			        <img src="<?php echo $admin_image_path?>icons/cross.png" alt=""/>
			        <?php echo getLangText('staff_cancel_button',$this); ?>
			   </a>
			</div>
		


 </form>
 </div>
 <script type="text/javascript">//<![CDATA[
      Calendar.setup({
        inputField : "f_dob",
        trigger    : "f_dob_button",
        onSelect   : function() { this.hide() },
        showTime   : 12,
        dateFormat : "%Y-%m-%d"
      });
    //]]></script>
 <script>
 $(document).ready(function() {
     $("#staff_form").RSV({
       onCompleteHandler: frmSubmit,
       errorFieldClass: "errorDesc",
       displayType: "display-html",
       errorHTMLItemBullet: "&#8212; ",
             rules: [
                     "required,first_name,Please enter name.",
					 "required,staff_code,Please enter staff code.",
					 "required,doj,Please enter date of join."
             ]
     });
  // a custom onComplete handler to prevent form submits for the demo
     function frmSubmit()
     {
       return true;
     }

        
});
 </script>